<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
</head>

<body>
    <div id="app">
        <!-- 只有在 `key` 是 `Enter` 时调用 `vm.submit()` -->
        <input @keyup.enter="submit" />
        <input @keyup.page-down="submit" />
        <hr>
        <!-- Alt + Enter -->
        <input @keyup.alt.enter="submit" />
        <!-- Ctrl + Click -->
        <div @click.ctrl="submit">Do something</div>
        <hr>
        <!-- 即使 Alt 或 Shift 被一同按下时也会触发 -->
        <button @click.ctrl="submit">@click.ctrl</button>

        <!-- 有且只有 Ctrl 被按下的时候才触发 -->
        <button @click.ctrl.exact="submit">@click.ctrl.exact</button>

        <!-- 没有任何系统修饰符被按下的时候才触发 -->
        <button @click.exact="submit"> @click.exact</button>
        <button @click.right.exact.prevent="submit">@click.right.exact.prevent</button>
    </div>

    <script>
        const app = {
            methods: {
                submit() {
                    console.log("submit");
                }
            }
        }
        Vue.createApp(app).mount("#app")
    </script>
</body>

</html>